//
//  UIView+Corner.h
//  TojoyCloud
//
//  Created by rr wanggy on 2019/4/16.
//  Copyright © 2019 _Engineer_雷海洋_. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface UIView (Corner)


/// 设置圆角
/// @param corner 圆角类型
/// @param cornerRadius 圆角大小
- (void)wb_setCorner:(UIRectCorner)corner cornerRadius:(CGFloat)cornerRadius;
/// 获取半角视图
-(void)wb_getHalfCornerView;
/// 设置圆角
/// @param radiu 半径大小
-(void)wb_getCornerViewWithRadius:(CGFloat)radiu;

/// 设置圆角
/// @param radiu 半径大小   borderColor 边框颜色  borderWidth 边框宽度
-(void)wb_getCornerViewWithRadius:(CGFloat)radiu borderColor:(UIColor *)borderColor borderWidth:(CGFloat)borderWidth;

/// 设置顶部圆角
/// @param radiu 半径大小
-(void)wb_getTopCornerWithRatio:(CGFloat)radiu;

/// 设置底部圆角
/// @param radiu 半径大小
-(void)wb_getBottomCornerWithRatio:(CGFloat)radiu;

/// 设置左边圆角
/// @param radiu 半径大小
-(void)wb_getLeftCornerWithRatio:(CGFloat)radiu;


/// 设置边框
/// @param color 边框颜色
- (void)wb_setBorderColor:(UIColor *)color;


/// 设置边框
/// @param color 边框颜色
/// @param lineWidth 边框大小
- (void)wb_setBorderColor:(UIColor *)color lineWidth:(CGFloat)lineWidth;


/// layer传nil则默认为self.layer
/// @param width 宽
/// @param color 颜色
/// @param cornerRadius 半径
/// @param layer layer
- (void)wb_setupBorderWidth:(CGFloat)width color:(CGColorRef)color cornerRadius:(CGFloat)cornerRadius needMaskLayer:(CALayer *)layer;





@end

NS_ASSUME_NONNULL_END
